package leecode

import (
	"math"
	"sort"
)

func findValueOfPartition(nums []int) int {
	sort.Ints(nums)
	result := math.MaxInt
	for i := 0; i+1 < len(nums); i++ {
		result = min(result, nums[i+1]-nums[i])
	}
	return result
}
